package com.ccsc.auth.utils;

/**
 * Created by houbo on 2016/3/24.
 */
public class BaseResponse {
    public Status status;
    public Object data;

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public BaseResponse(int code, String message, boolean success) {
        this.status = new Status();
        status.setCode(code);
        status.setMessage(message);
        this.data = success ? 1 : 0;
    }

    public BaseResponse(int code, Object data) {
        this.status = new Status();
        status.setCode(code);
        status.setMessage(code == HttpStatus.SUCCESS ? "系统请求成功！" : "系统请求失败！");
        this.data = data;
    }
}
